package pe.com.bbva.ge.domain.seguridad;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import pe.com.bbva.ge.domain.base.Auditoria;
import pe.com.bbva.ge.domain.configuracion.Valor;


/**
 * The persistent class for the SEG_MEMBRESIA database table.
 * 
 */
@Entity
@Table(name="SEG_MEMBRESIA")
public class Membresia extends Auditoria {
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(unique = true, nullable = false, precision = 19)
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "SEQ_MEMBRESIA")
	@TableGenerator(name = "SEQ_MEMBRESIA", table = Membresia.SEQ_TABLA, pkColumnName = Membresia.SEQ_TABLA_PK, initialValue = 1, valueColumnName = Membresia.SEQ_TABLA_COLUMN, pkColumnValue = "pe.com.bbva.ge.domain.configuracion.Membresia", allocationSize = 1)
	private long id;
	
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}
	
	//Remplazable POR JPA

	private String valor;

	//uni-directional many-to-one association to Valor
	@ManyToOne
	@JoinColumn(name="TIPO")
	private Valor tipo;

	//uni-directional many-to-one association to Valor
	@ManyToOne
	@JoinColumn(name="ESTADO")
	private Valor estado;

	//bi-directional many-to-one association to Rol
	@ManyToOne
	@JoinColumn(name="ROL")
	private Rol rol;

	public String getValor() {
		return this.valor;
	}

	public void setValor(String valor) {
		this.valor = valor;
	}

	public Valor getTipo() {
		return this.tipo;
	}

	public void setTipo(Valor tipo) {
		this.tipo = tipo;
	}

	public Valor getEstado() {
		return this.estado;
	}

	public void setEstado(Valor estado) {
		this.estado = estado;
	}

	public Rol getRol() {
		return this.rol;
	}

	public void setRol(Rol rol) {
		this.rol = rol;
	}
	

}